﻿
/*=========================================
* Author: Administrator
* DateTime:2017/6/21 17:55:55
* Description:$safeprojectname$
==========================================*/

namespace OrderSystem
{
    public enum E_WaiterState
    {
        Idle,
        SendMenu,
        SendOrder,
        SendFood,
        WaiterClientMenu,
        WaitClientPay,
        
    }

    public class WaiterItem
    {
        public int id { get; set; }
        public string name { get; set; }
        public E_WaiterState state { get; set; }
        public ClientItem serverClientitem;
        public Order serverOrder;

        public WaiterItem( int id , string name , E_WaiterState state = E_WaiterState.Idle)
        {
            this.id = id;
            this.name = name;
            this.state = state;
        }
        public override string ToString()
        {
            return id + "号服务员\n" + name + "\n" + resultState();
        }
        private string resultState( )
        {
            if (state.Equals(E_WaiterState.Idle))
                return "休息中";
            else if (state.Equals(E_WaiterState.SendMenu))
                return "取菜单中";
            else if (state.Equals(E_WaiterState.SendOrder))
                return "取订单中";
            else if (state.Equals(E_WaiterState.SendFood))
                return "送餐中";         
            else if (state.Equals(E_WaiterState.WaiterClientMenu))
                return "等待点菜中";
            else if (state.Equals(E_WaiterState.WaitClientPay))
                return "等待结账中";
            return "";
        }
    }
}